package com.du.design.singleton;

/**
 * @desc:
 * @author: shuangdu
 * @date: 2021/4/30
 * @since: 1.8
 */
public class Context {

    public static void main(String[] args) {
        SingletonCode instance = SingletonCode.getInstance();
        SingletonCode instance1 = SingletonCode.getInstance();
        System.out.println(instance.equals(instance1));

        EnumSingletonCode enumSingletonCode = EnumSingletonCode.INSTANCE;
        EnumSingletonCode enumSingletonCode1 = EnumSingletonCode.INSTANCE;
        System.out.println(enumSingletonCode.equals(enumSingletonCode1));
    }

}
